<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>完残情况表单</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<script type="text/plain" id="myEditorFile"></script>
	<form id="repairForm" method="post">
		<div style="display: none;">
			<input name="integrityId" class="mini-textbox" />
			<input id="mRelicsId" name="mRelicsId" class="mini-textbox" />
			<input id="relicsName" name="relicsName" class="mini-textbox" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="10%" class="xx_bt nonebor">原状完残程度:</td>
					<!-- <td class="xx_type"><input class="mini-combobox" name="oriIntegrityLevel"
						showNullItem="true" url="${path}/mgr/dictionary/showListByKey?dicKey=31"
						nullItemText="请选择完残程度"  style="width: 90%;"
						textField="dicValue" valueField="dicValue" allowInput="false" /><span
						class="required_cls">*</span></td>  -->
					<td width="23%" class="xx_type  nonebor">
						<div id="combobox2" class="mini-combobox" name="oriIntegrityLevel" 
							style="width:90%;"  popupWidth="230" textField="dicValue" valueField="dicValue"
					    	url="${path}/mgr/dictionary/showListByKey?dicKey=31"  multiSelect="true"  showClose="false" oncloseclick="onCloseClick" >     
						    <div property="columns">
						        <div header="类型" field="dicValue"></div>
						    </div>
						</div>
											
						<span class="required_cls"> </span></td>
					<td width="10%" class="xx_bt nonebor">原状完残状况:</td>
					<td width="23%" class="xx_type  nonebor"><input name="oriIntegrityStatus"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt nonebor">原状登记时间:</td>
					<td width="24%" class="xx_type  nonebor"><input name="oriEnrollTime" 
						style="width: 90%;" class="mini-datepicker" allowInput="false" format="yyyy-MM-dd" /><span 
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">现状完残程度:</td>
					<!--<td class="xx_type"><input class="mini-combobox" name="curIntegrityLevel"
						showNullItem="true" url="${path}/mgr/dictionary/showListByKey?dicKey=31"
						nullItemText="请选择完残程度"  style="width: 90%;"
						textField="dicValue" valueField="dicValue" allowInput="false" /><span
						class="required_cls">*</span></td>-->
					<td width="23%" class="xx_type  ">
						<div id="combobox2" class="mini-combobox" name="curIntegrityLevel" 
							style="width:90%;"  popupWidth="230" textField="dicValue" valueField="dicValue"
					    	url="${path}/mgr/dictionary/showListByKey?dicKey=31"  multiSelect="true"  showClose="false" oncloseclick="onCloseClick" >     
						    <div property="columns">
						        <div header="类型" field="dicValue"></div>
						    </div>
						</div>
											
						<span class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">现状完残状况:</td>
					<td width="23%" class="xx_type  "><input name="curIntegrityStatus"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">现状登记时间:</td>
					<td width="24%" class="xx_type  "><input name="curEnrollTime" 
						style="width: 90%;" class="mini-datepicker" allowInput="false" format="yyyy-MM-dd" /><span 
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">残损原因:</td>
					<td class="xx_type"><input class="mini-combobox" name="damagedReason"
						showNullItem="true" url="${path}/mgr/dictionary/showListByKey?dicKey=32"
						nullItemText="请选择完残程度"  style="width: 90%;"
						textField="dicValue" valueField="dicValue" allowInput="false" /><span
						class="required_cls">*</span></td>
					<td width="10%" class="xx_bt ">保存状态:</td>
					<td width="23%" class="xx_type  "><input name="saveStatus"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">保存条件:</td>
					<td class="xx_type"><input class="mini-combobox" name="saveCondition"
						showNullItem="true" url="${path}/mgr/dictionary/showListByKey?dicKey=33"
						nullItemText="请选择保存条件"  style="width: 90%;"
						textField="dicValue" valueField="dicValue" allowInput="false" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">保存环境:</td>
					<td width="23%" class="xx_type  "><input name="saveEnvironment"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">病害侵蚀度:</td>
					<td width="23%" class="xx_type  "><input name="disease"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">保护操作时间:</td>
					<td width="24%" class="xx_type  "><input name="protectTime" 
						style="width: 90%;" class="mini-datepicker" allowInput="false" format="yyyy-MM-dd" /><span 
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">保护措施:</td>
					<td width="23%" class="xx_type  "><input name="protectMeasure"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">保护技术类型:</td>
					<td width="23%" class="xx_type  "><input name="protectType"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">操作人:</td>
					<td width="24%" class="xx_type  "><input name="operator" 
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span 
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">保护资质:</td>
					<td width="23%" class="xx_type  "><input name="protectIntell"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">保护项目批文:</td>
					<td width="23%" class="xx_type  "><input name="protectLmo"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">保护记录:</td>
					<td width="90%" class="xx_type  " colspan="3"><input name="protectLogs"
						style="width: 80%;" class="mini-textbox" vtype="maxLength:100" />
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_M_REPAIR_01%>','showfiles')">浏览文件</a>
						<!-- 附件上传结束-->	
					</td>
					<td class="xx_type" id="showfiles" colspan = "2">
					<c:if test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 91}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if>
					</td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<c:if test="${param.flag!='show'}">
				<a class="mini-button" onclick="addform.saveData" id="sub_button"
					iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			</c:if>
			<a iconCls="icon-cancel" class="mini-button" onclick="$.form.onClose()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8" src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript" src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="${path}/js/upload.js"></script>
<script type="text/javascript">
	var doc = $(document);
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#repairForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			$.form.saveData({
				url : "${path}/mgr/mrepair/saverepairform",
				showMsg : true,//是否显示提示信息（返回参数必须是msg，json类型数据）
				id : "repairForm"
			});
		};
		
	});
	//页面初始化时，执行该函数资源类型
	window.onload = function() {
		mini.get("mRelicsId").setValue("${param.mRelicsId}");
		mini.get("relicsName").setValue(decodeURI("${param.relicsName}"));
	};
</script>
</html>